import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
import Home from '../components/Home.vue'
const routes = [{
        path: '/',
        component: Home
    },
    {
        path: '/city',
        name: 'city',
        component: () =>
            import ("@/components/City")
    },
    {
        path: '/detail',
        name: 'detail',
        component: () =>
            import ('../components/Detail')
    }
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router